package java3_20;
//客车类 子类
public class Passengercar extends Car{
    private String MotoVehicle1;

    public Passengercar(String carNumber, double money, boolean flag, int seatCount,String type,String MotoVehicle1) {
        super(carNumber, money, flag, seatCount,type);
        this.MotoVehicle1 = MotoVehicle1;
    }

    public String getMotoVehicle1() {
        return MotoVehicle1;
    }

    public void setMotoVehicle1(String motoVehicle1) {
        MotoVehicle1 = motoVehicle1;
    }

    @Override
    public void show() {
        System.out.println(  this.MotoVehicle1+"," + this.getType() + "," + this.getCarNumber() + "," + this.getSeatCount()
                + "," +"日租金"+ this.getMoney() +"￥"+ "," + this.isFlag());

    }

    @Override
    void showRentResult() {
        if (this.getMotoVehicle1().equals("客车")){
        System.out.println("您租赁的车型是："+getMotoVehicle1()+","+"车牌号是:"+this.getCarNumber()+","+this.getSeatCount()+"座");
    }
    }

    @Override
    void leaseOutFlow(String a) {
        if (a.equals("客车")){
            System.out.println(this.MotoVehicle1+","+  this.getType() + "," + this.getCarNumber() + "," + this.getSeatCount()
                    + "," + this.getMoney() + "," + this.isFlag());    }
    }

}
